package com.lin.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lin.blog.entity.UserRole;
import org.apache.ibatis.annotations.Delete;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lin
 * @since 2020-03-08
 */
public interface UserRoleMapper extends BaseMapper<UserRole> {

    /**
     * 通过userId删除UserRole表中的记录
     * @param userId
     * @return
     */
    @Delete("DELETE FROM user_role where user_id = #{userId}")
    public int deleteUserRoleByUserId(Long userId);
}
